package com.bite.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum CodeType {
    JAVA(0, "Java语言"),
    CPP(1, "C++语言"),
    GOLANG(2, "go语言"),
    ;
    private final Integer type;
    private final String desc;

    public static CodeType getInstance(Integer type) {
        if (JAVA.getType().equals(type)) {
            return JAVA;
        } else if (CPP.getType().equals(type)) {
            return CPP;
        } else if (GOLANG.getType().equals(type)) {
            return GOLANG;
        }
        return null;
    }
}
